NS selection bug fix and cleanup, see thread C-g crash in C-x C-f (OSX Lion).
authorJan D. <jan.h.d@swipnet.se>
Sun, 18 Dec 2011 13:49:38 +0000 (14:49 +0100)
committerJan D. <jan.h.d@swipnet.se>
Sun, 18 Dec 2011 13:49:38 +0000 (14:49 +0100)
commit27275da251a99097a8396fc664b3d2e894d7a23b
treecd4e17249b81a3afc011357e4800afd91f1aa8b3
parentdcbb6df09dc8cfb7ad97fa0944389a4d24804e0c
NS selection bug fix and cleanup, see thread C-g crash in C-x C-f (OSX Lion).
Thread is on emacs-devel.

* lisp/term/ns-win.el (ns-get-selection-internal)
(ns-store-selection-internal): Declare.
(ns-store-cut-buffer-internal, ns-get-cut-buffer-internal): Declare
as obsolete.
(ns-get-pasteboard, ns-paste-secondary): Use
ns-get-selection-internal.
(ns-set-pasteboard,  ns-copy-including-secondary): Use
ns-store-selection-internal.

* src/nsselect.m (CUT_BUFFER_SUPPORT): Remove define.
(symbol_to_nsstring): Fix indentation.
(ns_symbol_to_pb): New function.
(Fns_get_selection_internal): Renamed from Fns_get_cut_buffer_internal.
(Fns_rotate_cut_buffers_internal): Removed.
(Fns_store_selection_internal): Renamed from
Fns_store_cut_buffer_internal.
(ns_get_foreign_selection, Fx_own_selection_internal)
(Fx_disown_selection_internal, Fx_selection_exists_p)
(Fns_get_selection_internal, Fns_store_selection_internal): Use
ns_symbol_to_pb and check if return value is nil.
(syms_of_nsselect): Remove ifdef CUT_BUFFER_SUPPORT.  Remove
defsubr Sns_rotate_cut_buffers_internal.  Sns_get_cut_buffer_internal
renamed to Sns_get_selection_internal, Sns_store_cut_buffer_internal
renamed to Sns_store_selection_internal.
(ns_handle_selection_request): Move code to Fx_own_selection_internal
and remove this function.
(ns_handle_selection_clear): Remove, never used.
(Fx_own_selection_internal): Move code from ns_handle_selection_request
here.
lisp/ChangeLog
lisp/term/ns-win.el
src/ChangeLog
src/nsselect.m